import http from '../../http'
// 初始联动
const initadd = async () => {
    let data = await http({
        method: 'GET',
        url: 'categories',
    })
    return data
}
// 初始商品参数
const initshang = async (obj) => {
    let data = await http({
        method: 'GET',
        url: `categories/${obj.id}/attributes`,
        params: obj
    })
    return data
}
// 添加商品参数
const additem = async (obj) => {
    let data = await http({
        method: 'post',
        url: `goods`,
        data: obj
    })
    return data
}

export { initadd, initshang, additem }